home *** CD-ROM | disk | FTP | other *** search
/ Space & Astronomy / Space and Astronomy (October 1993).iso / mac / TEXT / SPACEDIG / V09_5 / V9_596.TXT < prev    next >
Internet Message Format  |  1991-07-08  |  11KB

  1. Return-path: <ota+space.mail-errors@andrew.cmu.edu>
  2. X-Andrew-Authenticated-as: 7997;andrew.cmu.edu;Ted Anderson
  3. Received: from corsica.andrew.cmu.edu via trymail for +dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl@andrew.cmu.edu (->+dist+/afs/andrew.cmu.edu/usr1/ota/space/space.dl) (->ota+space.digests)
  4.           ID </afs/andrew.cmu.edu/usr1/ota/Mailbox/0YsZIAa00UkVQ3Jk5t>;
  5.           Fri, 11 Aug 89 00:24:45 -0400 (EDT)
  6. Message-ID: <kYsZHy200UkV83I04C@andrew.cmu.edu>
  7. Reply-To: space+@Andrew.CMU.EDU
  8. From: space-request+@Andrew.CMU.EDU
  9. To: space+@Andrew.CMU.EDU
  10. Date: Fri, 11 Aug 89 00:24:30 -0400 (EDT)
  11. Subject: SPACE Digest V9 #596
  12.  
  13. SPACE Digest                                      Volume 9 : Issue 596
  14.  
  15. Today's Topics:
  16.       Geosync Satellite Finder (was Re: NASA Select Broadcasts)
  17.             Re: Ground the DC-10!?
  18.          Re: Request for more info on ozone depletion
  19. ----------------------------------------------------------------------
  20.  
  21. Date: 25 Jul 89 10:11:17 GMT
  22. From: mcvax!ukc!reading!cf-cm!cybaswan!iiit-sh@uunet.uu.net  (Steve Hosgood)
  23. Subject: Geosync Satellite Finder (was Re: NASA Select Broadcasts)
  24.  
  25. In article <4980@mtuxo.att.com> tee@mtuxo.att.com (54317-T.EBERSOLE) writes:
  26. >I told a friend of mine about the NASA Select broadcasts of Neptune
  27. >images on Tuesdays at noon. He has looked for them a couple of times
  28. >and had another friend look a couple of times, with no luck picking
  29. >up a signal. He has looked at other times to see if he can get anything,
  30. >also with no luck. Has anyone been able to find NASA Select's broadcasts?
  31. >
  32. >Thanks for any information.
  33. >
  34.  
  35. Please - before you flame me for this: I *know* sci.space isn't the place
  36. for sources, but I couldn't think of a better place for this one, and it's
  37. not too long anyway. Just copy the rest of this posting into a file, make
  38. it executable and run it as a shell-script. That gives you the file 'geosync.c'
  39. which you compile and run. Enjoy!
  40.  
  41. CUT HERE --- CUT HERE
  42. if test -f geosync.c; then echo "File geosync.c exists"; else
  43. echo "x - extracting geosync.c (Text)"
  44. sed 's/^X//' << 'SHAR_EOF' > geosync.c &&
  45. X/*
  46. X * GEOSYNC.C - Calculate position of a geostationary satellite.
  47. X * Version 1.2:    S.Hosgood, May 10th 1989
  48. X *
  49. X * This program is in the Public Domain.
  50. X * It may be freely copied and distributed as long as no charge is made.
  51. X *
  52. X * No responsibility can be accepted for the accuracy of the results.
  53. X * The program is for amusement only.
  54. X *
  55. X * Written for the IBM PC, using Microsoft C 4.0.
  56. X * Use is made of the IBM's 'degrees' symbol. It should be no problem to
  57. X * make it work on other systems though
  58. X *
  59. X * To run: just type 'geosync' and answer the questions.
  60. X *
  61. X * Please forward bug reports to:
  62. X * Steve Hosgood (iiit-sh@pyr.swan.ac.uk).
  63. X *
  64. X */
  65. X
  66. X# include    <stdio.h>
  67. X# include    <math.h>
  68. X# include    <ctype.h>
  69. X
  70. X# ifndef    PI
  71. X# define    PI        3.141592653589793
  72. X# endif
  73. X
  74. X# define    degtorad(x)    ((x)*PI/180.0)
  75. X# define    radtodeg(x)    ((x)*180.0/PI)
  76. X
  77. X/* Radius of Earth, and Radius of Geosync Orbit */
  78. X/* These constants are off the top of my head, may be a bit wrong */
  79. X# define    E_RAD        6378.388    /* Km (equator) */
  80. X# define    O_RAD        42240.31    /* Km (from centre of earth) */
  81. X
  82. X/* flattening factor for geoid */
  83. X# define    FLAT        (1.0 / 298.26)
  84. X
  85. Xdouble readval( char * );
  86. X
  87. Xmain()
  88. X{
  89. X    double    a, b, c, d, n, w;
  90. X    double    vert, tmp, e_rad;
  91. X    double    satwest, obswest, obsnorth;
  92. X
  93. X    satwest = readval("Enter satellite's Longitude");
  94. X    obswest = readval("Enter observer's Longitude");
  95. X    obsnorth = readval("Enter observer's Latitude");
  96. X
  97. X    a = sin(w = degtorad(satwest - obswest));
  98. X    b = sin(n = degtorad(obsnorth));
  99. X    c = cos(w);
  100. X    d = cos(n);
  101. X
  102. X    /* Earth's radius follows a sin-squared law with latitude (appx) */
  103. X    e_rad = E_RAD*(1 - FLAT*b*b);
  104. X    vert = O_RAD*c*d - e_rad;
  105. X
  106. X    /* attempt to avoid DOMAIN errors from trig functions */
  107. X    if ((tmp = O_RAD*sqrt(c*c*b*b + a*a)) <= 1e-6 && tmp >= -1e-6) {
  108. X        if (vert > 0.0)
  109. X            printf("Vertically up\n");
  110. X        else
  111. X            printf("Vertically down\n");
  112. X    }
  113. X    else {
  114. X        printf("Elevation = %6.2f\370\n", radtodeg(atan2(vert, tmp)));
  115. X
  116. X        if ((tmp = c*b) <= 1e-6 && tmp >= -1e-6)
  117. X            /* bearing directly east or west */
  118. X            tmp = a > 0.0? 90.0: -90.0;
  119. X        else
  120. X            tmp = radtodeg(atan2(a, tmp));
  121. X
  122. X
  123. X        printf("Bearing ");
  124. X        if (tmp > 89.95 && tmp < 90.05)
  125. X            printf("due West");
  126. X        else if (tmp < -89.95 && tmp > -90.05)
  127. X            printf("due East");
  128. X        else {
  129. X            /* nice to see bearings +/- South or +/- North */
  130. X            printf("(Clockwise from ");
  131. X    
  132. X            if (tmp < -90.0 || tmp > 90.0) {
  133. X                tmp += 180.0;
  134. X                printf("north");
  135. X    
  136. X                if (tmp >= 180.0)
  137. X                    tmp -= 360.0;
  138. X            }
  139. X            else
  140. X                printf("south");
  141. X    
  142. X            printf(") = %6.2f\370", tmp);
  143. X        }
  144. X
  145. X        putchar('\n');
  146. X    }
  147. X
  148. X    if ((d = e_rad/(O_RAD*cos(n))) > 1.0 || d < -1.0) {
  149. X        printf("No geosync satellites visible from there\n");
  150. X        printf("Limit latitude is appx \361%6.2f\370\n", radtodeg(acos(E_RAD/O_RAD)));
  151. X    }
  152. X    else {
  153. X        c = radtodeg(acos(d));
  154. X
  155. X        fputs("Satellites ", stdout);
  156. X        prlong(c+obswest);
  157. X        fputs(" thru ", stdout);
  158. X        prlong(obswest-c);
  159. X        fputs(" are visible\n", stdout);
  160. X    }
  161. X
  162. X    exit(0);
  163. X}
  164. X
  165. Xdouble
  166. Xreadval(str)
  167. Xchar *str;
  168. X{
  169. X    char        buffer[30];
  170. X    register char    chr, *cptr;
  171. X    int        err;
  172. X    static        longmesg = 0;
  173. X    double        ret, atof( char * );
  174. X
  175. X    do {
  176. X        /* prompt */
  177. X        fprintf(stderr, "%s: ", str);
  178. X        err = 0;
  179. X
  180. X        cptr = fgets(buffer, sizeof buffer, stdin);
  181. X        if (*cptr == '-')
  182. X            cptr++;
  183. X
  184. X        /* check that a number is present at all */
  185. X        if (!isdigit(*cptr) && *cptr != '.')
  186. X            goto error;            
  187. X
  188. X        /* get integer degrees part anyway */
  189. X        ret = atoi(cptr);
  190. X
  191. X        /* look for next non-numeric */
  192. X        for (; (chr = *cptr) && isdigit(chr); cptr++);
  193. X
  194. X        if (chr == ':') {
  195. X            /* get integer of minutes of arc */
  196. X            ret += atoi(++cptr) / 60.0;
  197. X
  198. X            /* step past minutes of arc */
  199. X            for (; (chr = *cptr) && isdigit(chr); cptr++);
  200. X
  201. X            if (chr == ':') {
  202. X                /* get seconds of arc */
  203. X                ret += atof(++cptr) / 3600.0;
  204. X
  205. X                /* step past seconds of arc */
  206. X                for (; (chr = *cptr) && isdigit(chr); cptr++);
  207. X                if (chr == '.')
  208. X                    /* step past optional decimal part */
  209. X                    for (cptr++; (chr = *cptr) && isdigit(chr); cptr++);
  210. X            }
  211. X            else if (chr == '.') {
  212. X                /* get decimal part of minutes of arc */
  213. X                ret += atof(cptr) / 60.0;
  214. X
  215. X                /* step past decimal part */
  216. X                for (cptr++; (chr = *cptr) && isdigit(chr); cptr++);
  217. X            }
  218. X
  219. X        }
  220. X        else if (chr == '.') {
  221. X            /* get decimal part of degrees */
  222. X            ret += atof(cptr);
  223. X
  224. X            /* step past decimal part */
  225. X            for (cptr++; (chr = *cptr) && isdigit(chr); cptr++);
  226. X        }
  227. X
  228. X        /* check final character */
  229. X        switch (chr) {
  230. X        case 'N':
  231. X        case 'n':
  232. X        case 'W':
  233. X        case 'w':
  234. X        case '\n':
  235. X            /* do nothing */
  236. X            break;
  237. X
  238. X        case 'E':
  239. X        case 'e':
  240. X        case 'S':
  241. X        case 's':
  242. X            ret = -ret;
  243. X            break;
  244. X
  245. X        default:
  246. X        error:
  247. X            /* print a fairly useful error message */
  248. X            fputs(buffer, stderr);
  249. X            *cptr-- = '\0';
  250. X            while (cptr >= buffer)
  251. X                *cptr-- = ' ';
  252. X
  253. X            fprintf(stderr, "%s^-----Error in input\n\n", buffer);
  254. X            err = 1;
  255. X        }
  256. X
  257. X        if (err & !longmesg) {
  258. X            fprintf(stderr, "Format: {-}<deg>{NSEW}\n");
  259. X            fprintf(stderr, "<deg> ::= integer or real\n\n");
  260. X            fprintf(stderr, "Or..  : {-}<deg>:<min>{NSEW}\n");
  261. X            fprintf(stderr, "<deg> ::= integer\n");
  262. X            fprintf(stderr, "<min> ::= integer or real\n\n");
  263. X            fprintf(stderr, "Or..  : {-}<deg>:<min>:<sec>{NSEW}\n");
  264. X            fprintf(stderr, "<deg> ::= integer\n");
  265. X            fprintf(stderr, "<min> ::= integer\n");
  266. X            fprintf(stderr, "<sec> ::= integer or real\n\n");
  267. X            fprintf(stderr, "Items in braces are optional\n\n");
  268. X            longmesg++;
  269. X        }
  270. X    } while (err);
  271. X
  272. X    return (*buffer == '-')? -ret: ret;
  273. X}
  274. X
  275. Xprlong(val)
  276. Xdouble val;
  277. X{
  278. X    char    eastwest;
  279. X
  280. X    /* get into range +180 -> -180 degrees */
  281. X    while (val > 180.0)
  282. X        val -= 360.0;
  283. X
  284. X    while (val < -180.0)
  285. X        val += 360.0;
  286. X
  287. X    if (val < 0.0) {
  288. X        eastwest = 'E';
  289. X        val = -val;
  290. X    }
  291. X    else if (val > 0.0)
  292. X        eastwest = 'W';
  293. X    else
  294. X        eastwest = ' ';
  295. X
  296. X    printf("%5.1f\370%c", val, eastwest);
  297. X    return;
  298. X}
  299. SHAR_EOF
  300. chmod 0644 geosync.c || echo "restore of geosync.c fails"
  301. fi
  302. exit 0
  303.  
  304. -----------------------------------------------+------------------------------
  305. Steve Hosgood BSc,                             | Phone (+44) 792 295213
  306. Image Processing and Systems Engineer,         | Fax (+44) 792 295532
  307. Institute for Industrial Information Techology,| Telex 48149
  308. Innovation Centre, University of Wales, +------+ JANET: iiit-sh@uk.ac.swan.pyr
  309. Swansea SA2 8PP                         | UUCP: ..!ukc!cybaswan.UUCP!iiit-sh
  310. ----------------------------------------+-------------------------------------
  311.             My views are not necessarily those of my employers!
  312.  
  313. ------------------------------
  314.  
  315. Date: 28 Jul 89 18:29:05 GMT
  316. From: att!laidbak!jeq@ucbvax.Berkeley.EDU  (Jonathan E. Quist)
  317. Subject: Re: Ground the DC-10!?
  318.  
  319. In article <1746@scicom.AlphaCDC.COM> wats@scicom.AlphaCDC.COM (Bruce Watson) writes:
  320. >
  321. >Why not?  There were civilians aboard.
  322.  
  323. Did I miss something?
  324.  
  325. ------------------------------
  326.  
  327. Date: 28 Jul 89 16:35:28 GMT
  328. From: ginosko!aplcen!haven!adm!smoke!chidsey@bbn.com  (Irving Chidsey )
  329. Subject: Re: Request for more info on ozone depletion
  330.  
  331. In article <609@visdc.UUCP> jiii@visdc.UUCP (John E Van Deusen III) writes:
  332. <I read today in my home-town paper that "scientists" had presented
  333. <"evidence" that the antarctic ozone hole might be "related to" increased
  334. <incidence of skin cancer in southern Australia and New Zealand.  Does
  335. <anyone know anything about this "study"?  It defies logic for a number
  336. <of reasons and is apparently the "first" study to make such a claim.
  337. <--
  338. <John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865
  339. <
  340. <uunet!visdc!jiii
  341.  
  342. There are several plausible reasons why the Antarctic Ozone Hole might have
  343. an effect in Southern Australia or Souther New Zealand.
  344.  
  345. The hole is not a neat hole with straight vertical sides like you might make
  346. with a drill; it has messy sloping sides like a hole in dry sand after it has
  347. been walked through a few times.
  348.  
  349. Horizontal winds can move the ozone depleted air for quite a distance before
  350. it gets to a location where the solar UV flux is strong enough to replenish
  351. the ozone.
  352.  
  353. The ozone density is the result of a dynamic balance between production and
  354. depletion.  The full equilibrium density as approached asymptoticaly, and
  355. extra solar UV gets through until full density is reached.
  356.  
  357. Note also that they said might.  This is still a conjecture supported by
  358. plausible armwaving arguments, and refuted by other plausible armwaving 
  359. arguments.  It sounds like it would be a good learning project for a Phd 
  360. candidate ( or perhaps a small group of graduate students ).
  361.  
  362.                     Irv
  363.  
  364.  
  365. -- 
  366. I do not have signature authority.  I am not authorized to sign anything.
  367. I am not authorized to commit the BRL, the DOA, the DOD, or the US Government
  368. to anything, not even by implication.
  369.             Irving L. Chidsey  <chidsey@brl.mil>
  370.  
  371. ------------------------------
  372.  
  373. End of SPACE Digest V9 #596
  374. *******************
  375.